#! /bin/bash

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
export PATH

fname=$1

if [ ! -z "$fname" ]; then
        #echo 'fname:'${fname%?}
        rar a -m0 -r -pmusicharts.org -v101376k ${fname%?}".rar" $fname && rm -rf $fname
else
        echo -e "\033[0;31;1mERROR: \033[0mWRONG FILE NAME"
fi